<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
<TITLE>HH_INITIALIZE command</TITLE>
<style>@import url(coUA.css);</style>
<link disabled rel="stylesheet" href="htmlhelp.css">
</head>

<BODY>

<h1>HH_INITIALIZE command</h1>

<p>This command initializes the help system for use and must be the first HTML Help command called. It returns a cookie which must be used in the <a href="cmd_hh_uninitialize.htm">HH_UNINITIALIZE</a> call.</p>

<p><b>HH_INITIALIZE</b> configures HTML Help to run on the same thread as the calling application instead of a secondary thread by setting the global property <b>HH_GPROPID_SINGLETHREAD</b> to <code>VARIANT_TRUE</code>. Running HTML Help on the same thread as the calling application requires the calling application to send messages to HTML Help by calling the <a href="cmd_hh_pretranslatemessage.htm">HH_PRETRANSLATEMESSAGE</a> command.</p>


<br>
<table border=1 cellpadding=3 cellspacing=0 width=100%>
<TR VALIGN="top">
<TH><I>pszFile</I></TH>
<TH><I>dwData</I></TH>
</TR>

<TR VALIGN="top">
<TD>
Must be NULL.
</TD>
<TD>
Specifies a pointer to a DWORD.
<p>This call returns a cookie that you must pass as the value of <i>dwData</i> when you call <a href="cmd_hh_uninitialize.htm">HH_UNINITIALIZE</a>.</p>

</TD>
</TR>
</TABLE>
<BR>

<H2>Example</H2>

<pre><code>
DWORD dwCookie = NULL;
<br>
<br>HtmlHelp(
<br>         NULL, 
<br>         NULL, 
<br>         HH_INITIALIZE, 
<br>         (DWORD)&dwCookie) ; // Cookie returned by Hhctrl.ocx.
</pre></code>   



<H2>Comments</H2>
<ul>
<li>Call <b>HH_INITIALIZE</b> before calling any other command and call <b>HH_UNINITIALIZE</b> only when your application ends. You should call these commands once during the life of your application.
</li>
</ul>

<H2>See also</H2>
<p><a href="cmd_hh_pretranslatemessage.htm">HH_PRETRANSLATEMESSAGE</a>
<br><a href="cmd_hh_uninitialize.htm">HH_UNINITIALIZE</a></p>

<br>
<table border="0" cellpadding="0" cellspacing="4">
<tr>
<td valign="top"><a href="ov_about_htmlhelp_commands.htm"><img src="home.gif" width=20 height=18 alt="link to overview topic" border="0"></a>
</td>
<td><a href="ov_about_htmlhelp_commands.htm">About commands</A>
</td>
</tr>
<tr>
<td>&nbsp;
</td>
</tr>
</table>

<br>
<!--start keywords--->

<!--end keywords--->


</BODY>
</HTML>
